import { request } from "@/utils/request.js"

// 购物车列表
export function cartPage(data = {}) {
	return request({
		url: '/user/cart/page',
		data
	})
}

// 添加或更新购物车
export function cartAddOrUpdate(data = {}) {
	return request({
		url: '/user/cart/addOrUpdate',
		data,
		showMsg: true
	})
}

// 购物车数量
export function cartCount(data = {}) {
	return request({
		url: '/user/cart/count',
		data
	})
}

// 删除购物车
export function cartDeleteCart(data = {}) {
	return request({
		url: '/user/cart/deleteCart',
		data,
		showMsg: true
	})
}
